package com.itcast.activiti.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 审批定义表 
 * </p>
 *
 * @author itcast
 * @since 2021-03-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ApproveDefinitionHistory implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    private String approveDefinitionId;

    /**
     * 工作流部署id
     */
    private String deploymentId;

    /**
     * 租户id
     */
    private String tenantId;

    /**
     * 审批类型：1：出勤休假）2：财务）3：人事）4：行政）5：其他）
     */
    private Integer groupType;

    /**
     * 审批名称
     */
    private String name;

    /**
     * 图标
     */
    private String icon;

    /**
     * 审批说明
     */
    private String description;

    /**
     * 审批意见填写提示
     */
    private String opinionPrompt;

    /**
     * 审批意见是否必填
     */
    private Integer opinionRequired;

    /**
     * 用户范围：谁可以发起这个审批json
     */
    private String userRange;

    /**
     * 流程json nocond
     */
    private String flowJson;

    private String flowDataJson;

    /**
     * 数据来源 0：初始化）1：新增）2：回退）3：加签）4：只会）
     */
    private Integer dataFrom;

    /**
     * 是否删除
     */
    private Boolean deleted;

    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime deletedDatetime;

    /**
     * 删除人
     */
    private String deletedBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createdDatetime;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime modifiedDatetime;

    /**
     * 修改人
     */
    private String modifiedBy;


}
